<?php
	include 'system/list.php';
	include 'conf.php';
	$a = "";
	{
		include 'dbconf.php';
	
		$bname = 'http://' . dirname($_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']) . '/';
		$suffix = '?DB_Name=' . $DB_name;
		reset($plugins);
		$a=file_get_contents($bname. 'system/install.php'. $suffix);
		while (list($key,$plug) = each($plugins)) {
			$b = file_get_contents($bname. 'plugins/'. $plug. '/install.php'. $suffix);
			$a = $a . $b;
		}
	}
	include 'system/db.php';
	chdir('system');
	db_rconnect_n_query($a);
	
	echo "Database created. Please remove ". $_SERVER['HTTP_HOST']. $_SERVER['PHP_SELF']. " file "; 
?>